exports.followUpRecordList = (req, res) => {

    var restfulParams = req.routeInfo.restfulParams;

    var resultData = {};

    var c_id = restfulParams.customerId;

    var u_id = 0;

    //用户基础信息查询
    function followUpRecordInquiry(cb) {

        R.SEND_HTTP(
            req,
            res,
            {
                url: CORE_APIConfig.coreAPI.artCustomerFollowRecordSearch.Request_Api_Url + "/cfr_is_delete/0/cfr_cid/" + c_id + "/sort_order/cfr_id-desc",
                method: 'POST',
                data: {
                    fields: ["cfr_id", "cfr_uid", "cfr_content", "cfr_way", "cfr_create_time", "cfr_comment", "cfr_comment_user", "cfr_next_time", "cfr_name"].join(",")
                }
            },
            function (data) {

                resultData.followUpRecord = data.result.data;

                if (data.result.data.length > 0) {
                    u_id = data.result.data[0].cfr_uid;
                }
                cb();

            }
        )
    }

    //查询销售信息
    function salesmanData(cb) {

        if (parseInt(u_id) > 0) {
            R.SEND_HTTP(
                req,
                res,
                {
                    url: CORE_APIConfig.coreAPI.userSearch.Request_Api_Url + "/u_id/" + u_id,
                    method: 'POST',
                    data: {
                        fields: ['u_id', 'u_nickname','u_openid'].join(",")
                    }
                },
                function (data) {

                    console.log(data);

                    resultData.salesmanData = data.result.data;

                    cb();

                }
            )
        } else {
            cb()
        }
    }

    F.Serial([
        followUpRecordInquiry,
        salesmanData,
    ], () => {
        RES.successResponse(res, resultData);
    })


}